using System;
using System.Collections.Generic;
using NHibernate.Search.Attributes;
using NHibernate.Search;

namespace Ic.Model
{
	#region BandsmanInstrument

	/// <summary>
	/// BandsmanInstrument object for NHibernate mapped table 'TB_BandsmanInstrument'.
	/// </summary>
	[Serializable]
	[TableInfo(TableName = "TB_BandsmanInstrument", PrimaryKey = "Id" , Columns="Id,BandsManId,InstrumentName,InstrumentType,InstrumentPhoto,InstrumentDesc,RegDate,Idx")]
	[Indexed(Index = "BandsmanInstrument")] 
	public class BandsmanInstrument
	{
		#region Member Variables
		
		protected int _id;
		protected int _bandsManId;
		protected string _instrumentName;
		protected string _instrumentType;
		protected string _instrumentPhoto;
		protected string _instrumentDesc;
		protected DateTime _regDate;
		protected int _idx;

		#endregion

		#region Constructors

		public BandsmanInstrument() { }

		public BandsmanInstrument( int bandsManId, string instrumentName, string instrumentType, string instrumentPhoto, string instrumentDesc, DateTime regDate, int idx )
		{
			this._bandsManId = bandsManId;
			this._instrumentName = instrumentName;
			this._instrumentType = instrumentType;
			this._instrumentPhoto = instrumentPhoto;
			this._instrumentDesc = instrumentDesc;
			this._regDate = regDate;
			this._idx = idx;
		}

		#endregion

		#region Public Properties

		[DocumentId]
		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public virtual int BandsManId
		{
			get { return _bandsManId; }
			set { _bandsManId = value; }
		}

		[Field(Index.Tokenized, Store = Store.Yes)]
		public virtual string InstrumentName
		{
			get { return _instrumentName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for InstrumentName", value, value.ToString());
				_instrumentName = value;
			}
		}

		[Field(Index.Tokenized, Store = Store.Yes)]
		public virtual string InstrumentType
		{
			get { return _instrumentType; }
			set
			{
				if ( value != null && value.Length > 20)
					throw new ArgumentOutOfRangeException("Invalid value for InstrumentType", value, value.ToString());
				_instrumentType = value;
			}
		}

		[Field(Index.Tokenized, Store = Store.Yes)]
		public virtual string InstrumentPhoto
		{
			get { return _instrumentPhoto; }
			set
			{
				if ( value != null && value.Length > 200)
					throw new ArgumentOutOfRangeException("Invalid value for InstrumentPhoto", value, value.ToString());
				_instrumentPhoto = value;
			}
		}

		[Field(Index.Tokenized, Store = Store.Yes)]
		public virtual string InstrumentDesc
		{
			get { return _instrumentDesc; }
			set
			{
				_instrumentDesc = value;
			}
		}

		public virtual DateTime RegDate
		{
			get { return _regDate; }
			set { _regDate = value; }
		}

		public virtual int Idx
		{
			get { return _idx; }
			set { _idx = value; }
		}

		

		#endregion
	}
	#endregion
}